package anroid.vstore.provider;

import android.content.Intent;
import android.support.v4.app.FragmentActivity;
import android.vstore.activities.BaseActivity;
import android.vstore.activities.SceneDetailItemActivity;
import android.vstore.activities.SceneGroupActivity;
import android.vstore.activities.SceneGroupVideoActivity;
import android.vstore.activities.SceneItemListActivity;
import DTO.ProductDTO;

public class Navigator {
	public static void toDetailItem(FragmentActivity activity, ProductDTO item)
	{
		Intent intent = new Intent(activity, SceneDetailItemActivity.class);
		ProductDTO.current = item;
		activity.startActivity(intent);
	}
	public static void toDetailItem(FragmentActivity activity, int itemid)
	{
		Intent intent = new Intent(activity, SceneDetailItemActivity.class);
		ProductDTO.current = null;
		intent.putExtra(Constant.ITEM_ID_KEY, itemid);
		activity.startActivityForResult(intent,0);
//		activity.finish();
	}
	public static void toItemList(BaseActivity activity,Integer id, String type,String name)
	{
		Intent intent = new Intent(activity, SceneItemListActivity.class);
		intent.putExtra(Constant.ITEM_TYPE_KEY, type);
		intent.putExtra(Constant.ITEM_ID_KEY, id);
		intent.putExtra(Constant.ITEMLIST_TYPE_NAME, name);
		activity.startActivityForResult(intent,0);
	}
	public static void toVideosList(BaseActivity activity)
	{
		Intent intent = new Intent(activity,SceneGroupVideoActivity.class);
		activity.startActivityForResult(intent, 0);
	}
}
